// Copyright 2010 Alexandre Tristan St-Cyr <tristan.stcyr@gmail.com>

package com.codeplex.loadjava.model;

import org.junit.Assert;
import org.junit.Test;

import com.codeplex.loadjava.model.JavaClass;
import com.codeplex.loadjava.model.MethodDefinition;

public class MethodDefinitionTest {

	@Test
	public void testEqualsObject() {
		JavaClass javaClass = new JavaClass("MyClass");
		MethodDefinition def1 = new MethodDefinition(javaClass, "()Ljava/util/List;", 
				"getList", 0, null);
		MethodDefinition def2 = new MethodDefinition(javaClass, "()Ljava/util/List;", 
				"getList", 1, null);
		MethodDefinition def3 = new MethodDefinition(javaClass, "()Ljava/util/List;", 
				"getList", 0, "()Ljava/util/List<Ljava/util/Object;>;");
		Assert.assertEquals(def1, def1);
		Assert.assertFalse(def1.equals(def2));
		Assert.assertFalse(def1.equals(def3));
	}

}
